package gijoe.controller;

import gijoe.dto.BoardRecruitDto;
import gijoe.service.AdminService;
import gijoe.service.UserService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class IndexController {

	@Autowired
	private UserService service;

/*Main : 손정원---------------------------------------------------------------------*/	
	@RequestMapping("/main.do")
	public ModelAndView hello() {
		ModelAndView mav = new ModelAndView();
		mav.addObject("notice", service.noticeSelectAll());
		mav.addObject("recruit", service.recruitSelectAll());
		mav.setViewName("home.main_content");

		return mav;
	}

	@RequestMapping("/menu_introduce.do")
	public ModelAndView introduce() {
		return new ModelAndView("user.inc1.menu_introduce");
	}

	@RequestMapping("/menu_jobtitle.do")
	public ModelAndView jobtitle() {
		return new ModelAndView("user.inc1.menu_jobtitle");
	}


	@RequestMapping("/receipt.do")
	public ModelAndView hello1() {
		return new ModelAndView("user.inc.application_receipt");
	}

	@RequestMapping("/menu_faq.do")
	public ModelAndView faq() {
		return new ModelAndView("user.inc1.menu_faq");
	}

	@RequestMapping("/app_update.do")
	public ModelAndView app_update() {
		return new ModelAndView("user.inc.app_update");
	}

	/*
	 * @RequestMapping("/app_delete.do") public ModelAndView delete() { return
	 * new ModelAndView("user.inc.app_delete"); }
	 */

	
	
	@RequestMapping("/recruitmentpro.do")
	public ModelAndView recruitmentpro() {
		return new ModelAndView("user.inc.recruitmentpro");
	}

	// 채용 공고 불러오기
	
	@RequestMapping("/recruitment.do")
	public ModelAndView recruitment(BoardRecruitDto dto) {
		System.out.println(dto);
		return new ModelAndView("user.inc.recruitment", "list",	service.recruitSelectAll(dto));
	}

	@RequestMapping("/DesignerInfo.do")
	public ModelAndView desiner() {
		return new ModelAndView("user.inc.menu_DesignerInfo");
	}

	@RequestMapping("/menu_esiinfo.do")
	public ModelAndView esiinfo() {
		return new ModelAndView("user.inc.menu_esiinfo");
	}

	@RequestMapping("/menu_map.do")
	public ModelAndView map() {
		return new ModelAndView("home.menu_map");
	}

	@RequestMapping("/menu_sitemap.do")
	public ModelAndView sitemap() {
		return new ModelAndView("home.menu_sitemap");
	}

	@RequestMapping("/hrinfo.do")
	public ModelAndView hrinfo() {
		return new ModelAndView("user.inc.menu_hrinfo");
	}

	@RequestMapping("/recruitmentone.do")
	public ModelAndView recruitmentpro1() {
		return new ModelAndView("user.inc.recruitmentpro");
	}

	@RequestMapping("/app_career_insert.do")
	public ModelAndView app_career_insert() {
		return new ModelAndView("user.inc.app_career_insert");
	}

	@RequestMapping("/app_etc_insert.do")
	public ModelAndView app_etc_insert() {
		return new ModelAndView("user.inc.app_etc_insert");
	}

	@RequestMapping("/app_basic_update.do")
	public ModelAndView app_basic_update() {
		return new ModelAndView("user.inc.app_basic_update");
	}

	@RequestMapping("/app_career_update.do")
	public ModelAndView app_career_update() {
		return new ModelAndView("user.inc.app_career_update");
	}

	@RequestMapping("/app_etc_update.do")
	public ModelAndView app_etc_update() {
		return new ModelAndView("user.inc.app_etc_update");
	}

	@RequestMapping("/app_self_update.do")
	public ModelAndView app_self_update() {
		return new ModelAndView("user.inc.app_self_update");
	}

	@RequestMapping("/app_submit_update.do")
	public ModelAndView app_submit_update() {
		return new ModelAndView("user.inc.app_submit_update");
	}

	@RequestMapping("/menu_qna.do")
	public ModelAndView menu_qna() {
		return new ModelAndView("user.inc1.menu_qna");
	}

}
